package com.hc.tenant.domain;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hc.common.core.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * mqtt对象 t_mqtt_msg_send
 *
 * @author yjz
 * @date 2021-04-07
 */
public class MqttMsgSend implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long msgId;

    /** 主题 */
    @Excel(name = "主题")
    private String topicName;

    /** 消息 */
    @Excel(name = "消息")
    private String msg;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 发送成功标记 */
    @Excel(name = "发送成功标记")
    private Integer success;



    /** 最后发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastSendTime;


    /** 重试次数 */
    @Excel(name = "重试次数")
    private Integer retry;

    public void setMsgId(Long msgId)
    {
        this.msgId = msgId;
    }

    public Long getMsgId()
    {
        return msgId;
    }
    public void setTopicName(String topicName)
    {
        this.topicName = topicName;
    }

    public String getTopicName()
    {
        return topicName;
    }
    public void setMsg(String msg)
    {
        this.msg = msg;
    }

    public String getMsg()
    {
        return msg;
    }
    public void setSuccess(Integer success)
    {
        this.success = success;
    }

    public Integer getSuccess()
    {
        return success;
    }
    public void setLastSendTime(Date lastSendTime)
    {
        this.lastSendTime = lastSendTime;
    }

    public Date getLastSendTime()
    {
        return lastSendTime;
    }
    public void setRetry(Integer retry)
    {
        this.retry = retry;
    }

    public Integer getRetry()
    {
        return retry;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("msgId", getMsgId())
                .append("topicName", getTopicName())
                .append("msg", getMsg())
                .append("createTime", getCreateTime())
                .append("success", getSuccess())
                .append("lastSendTime", getLastSendTime())
                .append("retry", getRetry())
                .toString();
    }
}